package fnord.illuminati.card.winconditions;

import fnord.exception.UFOException;
import fnord.illuminati.card.WinCondition;
import fnord.network.server.Player;

public class UFOWinCondition extends WinCondition {
	private static final long serialVersionUID = 7839839605809524837L;

	private WinCondition _winCondition = null;
	
	public void setWinCondition(WinCondition winCondition) {
		_winCondition = winCondition;
	}
	
	@Override
	public boolean hasWon(Player p) throws UFOException {
		if (_winCondition != null)
			return _winCondition.hasWon(p);
		else
			throw new UFOException("Win condition not set.");
	}

}
